home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Magazine Collection 2001
/
Delphi Magazine Collection 20001 (2001).iso
/
DISKS
/
ISSUE23
/
STARTUP
/
StubDllU.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-03-21
|
568b
|
30 lines
unit StubDllU;
interface
implementation
uses
SysUtils, WinProcs;
var
OldExitProc: Pointer;
procedure NewExitProc; far;
begin
ExitProc := OldExitProc;
OutputDebugString('DLL: Exit procedure added the old fashioned way (ExitProc)'#13#10);
end;
procedure NewerExitProc; far;
begin
OutputDebugString('DLL: Exit procedure added with AddExitProc'#13#10);
end;
initialization
OutputDebugString('DLL: Unit initialisation section'#13#10);
OldExitProc := ExitProc;
ExitProc := @NewExitProc;
AddExitProc(NewerExitProc);
end.